home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / FDATE68A.ARJ / FDATE.DOC < prev    next >
Text File  |  1992-07-30  |  68KB  |  1,709 lines

  1. FDATE      Version 6.8a                          Aug 01, 1992
  2. ===================================================================
  3. FDATE: a utility for date manipulation in batch files.
  4. ===================================================================
  5. Stephen Ferg             5113 N. 8th Road, Arlington, VA 22205-1201
  6. Voice (703) 525-2241     CompuServe 73377,1157
  7.  
  8. =======================================================================
  9. Format:
  10. FDATE /Ffunc /Adate /Iformat /Pstring
  11.              /Bdate /Oformat /Sstring /Nnum /Ddayofweek
  12. =======================================================================
  13.  
  14.  
  15. FDATE PARAMETERS
  16. ================
  17.  
  18. The parameters that are required depend on the function requested.
  19. Parameters that are specified, but not needed, are ignored.
  20. Executing FDATE without any parameters displays a brief help screen.
  21.  
  22. Parameters can be in any order and upper or lower case.
  23.      Note that although function and format parms are not case
  24.      sensitive, they are "text sensitive".  If any characters are
  25.      missing, added, or mistyped, the parameter will be rejected.
  26.  
  27.  /F  requests a particular FDATE function
  28.      If this parameter is not specified,
  29.      FDATE displays a help screen.  If you unexpectedly get the help
  30.      screen displayed, you probably have omitted the /F parameter.
  31.  
  32.  /N  number of days (always a number)
  33.  
  34.  /D  day-of-week number (used only with W function)
  35.  
  36.  /A  date A  (for date functions)
  37.  /B  date B  (for date functions)
  38.      If the /A parameter is omitted, /Atoday is assumed.
  39.      If the /B parameter is omitted, /Btoday is assumed.
  40.  
  41.  /A  number A  (for math functions)
  42.  /B  number B  (for math functions)
  43.  
  44.  /I  specifies format of input date(s)
  45.      If the /I parameter is omitted, /Imm-dd-ccyy is assumed.
  46.  
  47.  /O  specifies format of output date
  48.      If the /O parameter is omitted, /Od1 is assumed.
  49.  
  50.  /L  specifies language of output.
  51.      /Lus   US (American) English-language output
  52.      /Lfr   French-language output
  53.      /Lsp   Spanish-language output
  54.      If the /L parameter is omitted, /Lus [American English] is assumed.
  55.  
  56.  /V  specifies that output is to be placed in an environment variable
  57.      rather than written to standard output.
  58.  
  59.  /P  specifies a prefix string for the output
  60.  /S  specifies a suffix string for the output
  61.      These optional parameters may always be specified or omitted.
  62.      They must be enclosed in single quotes, double quotes, or
  63.                   square brackets
  64.  
  65.      Note that "whitespace" will be removed from these strings,
  66.      so formatting of /P and /S strings cannot be controlled using
  67.      spaces.  To format strings, use periods or ASCII 255 (hex'ff')
  68.      as filler.
  69.  
  70.      EXAMPLES
  71.      FDATE /Ff   /At /Od1         /P"Today is "
  72.      FDATE /Fdif /At /B12-25-TTTT /S" days until Christmas"
  73.      FDATE /Fdif /At /B12-25-TTTT /P"It is " /S" days 'til Xmas"
  74.      FDATE /Ff       /A05-08-TTTT /S[ -- "Crazy Eddy's" birthday]
  75.  
  76.  
  77.  
  78. ERROR HANDLING
  79. ==============
  80.  
  81.    If FDATE detects an error:
  82.  
  83.      (1) it will return an errorlevel of 1 (rather than 0), and
  84.      (2) its output will be 3 lines:
  85.        * the word ERROR
  86.        * a DOS batch-file ECHO statement that displays an error message
  87.        * a DOS batch-file PAUSE statement
  88.  
  89.    If Fdate output is displayed directly, or redirected to NUL:
  90.    you can detect an error by testing the errorlevel for a value of 1.
  91.  
  92.    If Fdate output is piped to an environment manipulation utility such
  93.    as STRINGS or GET, the environment variable will be set to ERROR.
  94.    Errorlevel will be set by STRINGS/GET, and will probably be 0.
  95.    In such a case, the only way to detect an error is to test the
  96.    environment variable for the value ERROR.
  97.  
  98.    If FDATE output is redirected to a batch file, which is then
  99.    CALLed to set an environment variable, the batch file will:
  100.      * set the environment variable to ERROR,
  101.      * ECHO the error message, and
  102.      * pause.
  103.    You can detect an error by testing errorlevel for the value 1
  104.    either before or after you CALL the batch file.
  105.    You can detect an error by testing the environment variable for the
  106.    value ERROR, AFTER you have CALLed the batch file.
  107.  
  108. ----------------------------------------------------------------------
  109.  
  110.  EXAMPLE:
  111.    rem use FDATE to check validity of year in parm %1
  112.    Fdate /Ff /Imm-dd-ccyy /ATT-TT-%1 /Occyy /P"Received year parm: "
  113.    if errorlevel 1 echo Year parm [%1] is not valid.
  114.    if errorlevel 1 goto endit
  115.  
  116.  EXAMPLE:
  117.    rem use FDATE to verify %1, and GET to put it into %year%
  118.    Fdate /Ff /Imm-dd-ccyy /ATT-TT-%1 /Occyy | GET ZE /V%year% >nul
  119.    if (%year%)==(ERROR) echo Year parm [%1] is not valid.
  120.    if (%year%)==(ERROR) goto endit
  121.  
  122.  EXAMPLE:
  123.    rem use FDATE to verify %1, call a batch file to put it into %year%
  124.    Fdate /Ff /Imm-dd-ccyy /ATT-TT-%1 /Occyy /P"@set year=">junktemp.bat
  125.    call junktemp.bat
  126.    del  junktemp.bat
  127.    if errorlevel 1 echo Year parm [%1] is not valid.
  128.    if errorlevel 1 goto endit
  129.  
  130. SYMBOL CONVENTIONS
  131. ==================
  132.  
  133. The following symbols are used in specifying date formats:
  134.  
  135. SYMBOL  EXAMPLE   MEANING
  136. ------  -------   -------------------------------------
  137. cc        19      century
  138. yy        93      year
  139. mm        02      month
  140. zm         2      month without leading zero
  141. dd        08      day
  142. zd         8      day   without leading zero
  143. mn       February month name
  144. mn3      Feb      month name, first 3 characters only
  145. dow      Tuesday  day of week
  146. dow3     Tue      day of week, first 3 characters only
  147. dow#      3       day of week as a number (Sunday=1, Monday = 2, etc.)
  148. today             is a "pseudodate" representing the current date
  149. t                 is an alias for the "today" pseudodate
  150. hh:mm    09:05    hours and minutes
  151. hhmm     0905     hours and minutes
  152. ss        09      seconds
  153.  
  154.  
  155.  
  156. PSEUDODATES
  157. ===========
  158.  
  159. t (or today)
  160.           can be used with either /A or /B, e.g. /Atoday or /At.
  161.           This is the default for both /A and /B.  That is,
  162.           if for example /A is not specified, /At is assumed.
  163.  
  164. EXAMPLE
  165.           rem Get the date that is 90 days from today
  166.           FDATE /Fadd /N90 /Atoday /Omm-dd-ccyy
  167.           FDATE /Fadd /N90 /At     /Omm-dd-ccyy
  168.  
  169.           rem determine if this year is a leapyear
  170.           FDATE /Ff /At /OLY
  171.  
  172. tt        when used in place of a 2-digit DD string, will cause
  173.           Fdate to use today's day-of-the-month.
  174.           Example:    FDATE /Ff /Imm-dd-ccyy /A01-tt-1992 /Od1
  175.  
  176. tt        when used in place of a 2-digit MM string, will cause
  177.           Fdate to use today's month.
  178.           Example:    FDATE /Ff /Imm-dd-ccyy /Att-01-1992 /Od1
  179.  
  180. tt        when used in place of a 2-digit YY string, will cause
  181.           Fdate to use today's year (CCYY).
  182.           Example:    FDATE /Ff /Imm-dd-yy /A01-01-tt /Od1
  183.  
  184.           Note that TT can NOT be used for only the YY part of a CCYY
  185.           input year.  The following, for example, is NOT valid:
  186.           Example:    FDATE /Ff /Imm-dd-ccyy /A01-01-19tt /Od1
  187.  
  188. tttt      when used in place of a 4-digit CCYY string, will cause
  189.           Fdate to use today's year (CCYY).
  190.           Example:    FDATE /Ff /Imm-dd-ccyy /A01-01-tttt /Od1
  191.  
  192.  
  193. EXAMPLES:
  194.  
  195. Show the first Monday in the second quarter of this year
  196. FDATE /Fw /Iccyymmdd /Atttt0301 /D2 /N1 /Od1 /P"First Monday in QTR#2: "
  197.  
  198. Show the last Friday on/before the 15th of this month.
  199. FDATE /Fw /Iccyymmdd /Atttttt15 /D6 /N-1 /Od1 /P"Friday before the 15th: "
  200.  
  201.  
  202. INPUT FORMATS
  203. =============
  204.  
  205. NOTE
  206. If ALL input dates are specified using the "today" pseudodate, (i.e.
  207. /At, /Bt) then it is not necessary to supply an input format using /I.
  208.  
  209. -----------------------------------------------------------------------
  210.                 FILE SPEC INPUT FORMATS
  211. -----------------------------------------------------------------------
  212. FORMAT      EXAMPLES      DISCUSSION
  213. ------      ---------     -----------------------------
  214. f           MYFILE.1      Input format F (file) tells Fdate that
  215.                           /A and /B will specify filenames, and that
  216.                           Fdate should pick up the input date and time
  217.                           from the date/time stamp on a file.
  218.  
  219.                           -------------------------------------------
  220.                           Note that for functions which accept the /B
  221.                           parm (e.g. comp, dif), it is not possible to
  222.                           put a filename in /A and a date spec in /B.
  223.                           If you specify /If, then both /A and /B will
  224.                           be interpreted as filenames.  The only
  225.                           exception is the pseudodate "t" (i.e. /At or
  226.                           /Bt) which will pick up the current date and
  227.                           time from the system clock.  This feature
  228.                           will allow you, for example, to compare the
  229.                           date of a file to today's date (see EXAMPLE
  230.                           #10, below).
  231.                           -------------------------------------------
  232.  
  233.                           The filename may (but need not) be fully
  234.                           qualified: i.e. MYFILE.1 and
  235.                           C:\DBASE\WORKDIR\MYFILE.1 are both
  236.                           acceptable.
  237.  
  238.                           The filename may contain wildcards.  If it
  239.                           does, the date/time stamp will be retrieved
  240.                           from the first file that Fdate finds that
  241.                           meets the filespec.  Giving FDATE a filespec
  242.                           containing a wildcard is pretty useless, but
  243.                           Fdate will not reject it.
  244.  
  245. -----------------------------------------------------------------------
  246.             CALENDAR DATE INPUT FORMATS
  247. -----------------------------------------------------------------------
  248. FORMAT      EXAMPLES      DISCUSSION
  249. ------      ---------     -----------------------------
  250. ccyymmdd    19922002
  251.  
  252. ccyy-mm-dd  1992-02-20    In an input format specification, the dash
  253.             1992/02/20    symbols represent ANY non-numeric symbol.
  254.             1992.02.20    Leading zeros MUST be present.
  255.  
  256. mm-dd-ccyy  02-20-1992    In an input format specification, the dash
  257.             02/20/1992    symbols represent ANY non-numeric symbol.
  258.  
  259.              2-5-1992     Leading zeros need not be present.
  260.              2/5/1992
  261.  
  262. mm-dd-yy    02-05-92      February 5, 1992.  See discussion of
  263.              2/5/92       FDATE'S CENTURY ASSUMPTION ALGORITHM, below
  264.  
  265.                           ---------------------------------------
  266.                           In the following formats, days
  267.                           precede months  (European style)
  268.                           ---------------------------------------
  269.  
  270. dd-mm-ccyy  05-02-1992    In an input format specification, the dash
  271.             05/02/1992    symbols represent ANY non-numeric symbol.
  272.  
  273.              5-2-1992     Leading zeros need not be present.
  274.              5/2/1992
  275.  
  276. dd-mm-yy    05-02-92      February 5, 1992.  See discussion of
  277.              5/2/92       FDATE'S CENTURY ASSUMPTION ALGORITHM, below
  278.  
  279. -----------------------------------------------------------------------
  280.                 JULIAN DATE INPUT FORMATS
  281. -----------------------------------------------------------------------
  282. NOTE:   * JJJ can actually be 1 - 4 digits
  283.         * may include a prefix of a plus or minus ( + or - ) sign
  284. -----------------------------------------------------------------------
  285. FORMAT      EXAMPLES      DISCUSSION
  286. ------      ---------     -----------------------------
  287. ccyyjjj     1992003       Third day of 1992, i.e. Jan 3, 1992
  288.             19923         Third day of 1992
  289.             tttt003       Third day of this year
  290.             tttt3         Third day of this year
  291.  
  292.   yyjjj       92003       Third day of 1992
  293.               923         Third day of 1992
  294.               tt003       Third day of this year
  295.               tt3         Third day of this year
  296.               01003       Third day of 2001           See
  297.                           FDATE'S CENTURY ASSUMPTION ALGORITHM, below
  298.  
  299.  
  300. NOTE THAT FDATE WILL ACCEPT "JJJ" OF LESS THAN 1 & MORE THAN 366.
  301. -----------------------------------------------------------------
  302.  
  303.   yyjjj       tt1000      the 1000th day from beginning of this year
  304.               tt0         last day of last year
  305.               tt-1        next-to-last day of last year
  306.  
  307. FDATE /Ff /Iccyyjjj /Od1 /A1992-1  produces... Monday December 30, 1991
  308. FDATE /Ff /Iccyyjjj /Od1 /A19920   produces... Tuesday December 31, 1991
  309. FDATE /Ff /Iccyyjjj /Od1 /A1992+1  produces... Wednesday January 1, 1992
  310.  
  311. FDATE /Ff /Iccyyjjj /Od1 /A1992366 produces... Thursday December 31, 1992
  312. FDATE /Ff /Iccyyjjj /Od1 /A1992367 produces... Friday January 1, 1993
  313.  
  314. This feature allows limited date arithmetic with ordinary business
  315. Julian days.  For example, 90 days from tt300 can be shown by:
  316.  
  317.                   FDATE /Ff /Iyyjjj /Att390
  318.  
  319.  
  320. FDATE'S CENTURY-ASSUMPTION ALGORITHM
  321. ====================================
  322. If an input date is supplied in a format in which the year is
  323. specified without a century -- that is, as YY rather than CCYY --
  324. then Fdate does not automatically use the current century.
  325. Instead,
  326.  
  327.    *  if YY is greater than 20,       then FDATE assumes CC = 19
  328.    *  if YY is less than or equal 20, then FDATE assumes CC = 20
  329.  
  330. Examples:
  331.          21    becomes  1921
  332.          ...
  333.          99    becomes  1999
  334.          00    becomes  2000
  335.          01    becomes  2001
  336.          ...
  337.          20    becomes  2020
  338. but then (again)
  339.          21    becomes  1921
  340.  
  341. To put it simply, FDATE makes what would be a reasonable assumption
  342. about the century for someone operating in the 1990's: it looks back to
  343. 1921 and forward to 2020.  If both I and FDATE are still alive in the
  344. year 2000, I'll probably update FDATE's century-assumption algorithm to
  345. shift it forward several decades.
  346.  
  347.  
  348. OUTPUT FORMATS
  349. ==============
  350.  
  351. FORMAT        EXAMPLES      DISCUSSION
  352. ------        ---------     -----------------------------
  353.  
  354. dd-mn3-yy     08-Feb-92     CompuServe-style date
  355.  
  356.   yy            93          2-digit year number
  357. ccyy          1993          4-digit year number (includes century)
  358. ccyymm        199302        useful for triggering monthly processing
  359. ccyymmdd      19930208      useful for putting current date in filename
  360.   yymmdd        908208      useful for putting current date in filename
  361.     mmdd          0208
  362.       mm            02      2-digit month number
  363.       dd            08      2-digit day-of-month number
  364.       zd             8      day-of-month number, no leading zeros.
  365.  
  366. In the following formats, months precede days (American style)
  367. ------------------------------------------------------------------
  368. mm/dd/ccyy    02/08/1993
  369. mm-dd-ccyy    02-08-1993
  370. mm.dd.ccyy    02.08.1993    British-style dates
  371.  
  372. zm/zd/ccyy     2/8/1993     no leading zeros in day or month
  373. zm-zd-ccyy     2-8-1993     no leading zeros in day or month
  374. zm.zd.ccyy     2.8.1993     British-style dates
  375.  
  376. mm/dd/yy      02/08/92
  377. mm-dd-yy      02-08-92
  378. mm.dd.yy      02.08.92      British-style dates
  379.  
  380. zm/zd/yy       2/8/92       no leading zeros in day or month
  381. zm-zd-yy       2-8-92       no leading zeros in day or month
  382. zm.zd.yy       2.8.92       no leading zeros in day or month
  383.  
  384. In the following formats, days precede months  (European style)
  385. ------------------------------------------------------------------
  386. dd/mm/ccyy    02/08/1993
  387. dd-mm-ccyy    02-08-1993
  388. dd.mm.ccyy    02.08.1993    British-style dates
  389.  
  390. zd/zm/ccyy     2/8/1993     no leading zeros in day or month
  391. zd-zm-ccyy     2-8-1993     no leading zeros in day or month
  392. zd.zm.ccyy     2.8.1993     British-style dates
  393.  
  394. dd/mm/yy      02/08/92
  395. dd-mm-yy      02-08-92
  396. dd.mm.yy      02.08.92      British-style dates
  397.  
  398. zd/zm/yy       2/8/92       no leading zeros in day or month
  399. zd-zm-yy       2-8-92       no leading zeros in day or month
  400. zd.zm.yy       2.8.92       British-style dates
  401.  
  402. ------------------------------------------------------------------
  403.  
  404. Miscellaneous output formats
  405. ------------------------------------------------------------------
  406.  
  407. dow#           5            Sunday=1, Monday=2 .... Saturday=7.
  408.  
  409. dow            Thursday     name of day of week
  410.                Jeudi        if /Lfr specified
  411.  
  412. dow3           Thu          first 3 characters of name of day of week
  413.                Jeu          if /Lfr specified
  414.  
  415. mn             February     name of month
  416.                Fevrier      if /Lfr specified
  417.  
  418. mn3            Feb          first 3 characters of name of month
  419.                Fev          if /Lfr specified
  420.  
  421. ddmn3yy       05Feb92
  422. ------------------------------------------------------------------
  423.  
  424.  
  425. LY              0           1 if year is a leapyear, otherwise 0.
  426.                                ------------------------------------
  427.                                365 + this number gives total
  428.                                      number of days in the year.
  429.                                 28 + this number gives total
  430.                                      number of days in February.
  431.                                ------------------------------------
  432.  
  433. d1           Saturday, February 5, 1992
  434.              le Samedi 5 Fevrier 1992      [/Lfr specified]
  435.  
  436. t1            9:05 am
  437.               9:05 pm
  438.  
  439. HH:MM        09:05      24-hour time, hours:minutes
  440.              21:05
  441. HHMM         0905
  442.              2105
  443.  
  444. HH:MM:SS     21:05:30   24-hour time, hours:minutes:seconds
  445. HHMMSS       210530
  446.  
  447. full          9:05 pm on Wednesday February 5, 1992
  448.               9:05 pm, le Mercredi 5 Fevrier, 1992  [/Lfr specified]
  449.               9:05 pm, el miércoles 5 febrero, 1992 [/Lsp specified]
  450. -----------------------------------------------------------------------
  451. NOTE that the following formats contain embedded spaces.  Consequently
  452. they must be enclosed in double quotes. EXAMPLE: /O"mn zd, ccyy".
  453. -----------------------------------------------------------------------
  454. "zd mn ccyy"      5 February 1992
  455. "zd mn, ccyy"     5 February, 1992
  456. "mn3 dd ccyy"     Feb 05 1992
  457. "mn3 dd, ccyy"    Feb 05, 1992
  458. "mn zd, ccyy"     February 5, 1992
  459.  
  460.  
  461.  
  462. "JULIAN" OUTPUT FORMATS
  463. =======================
  464.  
  465. FORMAT        EXAMPLES      DISCUSSION
  466. ------        ---------     -----------------------------
  467.  
  468. ccyyjjj       1992027       Jan 27, 1992
  469.   yyjjj         92027       BUSINESS "Julian date" expressed as number
  470.     jjj           027       of days since January 1 of the same year.
  471.     zzj            27       Note leading zero suppression in "zzj".
  472.  
  473. day#           727198       TRUE "Julian date" expressed as number
  474.                             of days since January 1, 0001.
  475.  
  476. minute#         33088       "Julian minutes": time expressed as number
  477.                             of minutes  since midnight, January 1, 1990.
  478.  
  479. second#        633088       "Julian seconds": time expressed as number
  480.                             of seconds  since midnight, January 1, 1990.
  481.  
  482. ----------------------------------------------------------------------
  483.    Running FDATE with /O parameter for a "Julian time" produces a
  484.    number based on the current time of day and the date in the /A parm.
  485.  
  486.    If, on January 10, 1992 at 2 pm, you run FDATE this way:
  487.        FDATE /Ff /Atoday /Ominute#
  488.    it will produce the Julian minute for January 10, 1992 at 2 pm.
  489.  
  490.    If, on January 10, 1992 at 2 pm, you run FDATE this way:
  491.        FDATE /Ff /A01-15-1992 /Imm-dd-ccyy  /Ominute#
  492.    it will produce the Julian minute for January 15, 1992 at 2 pm.
  493. ----------------------------------------------------------------------
  494.  
  495. DATE FUNCTIONS
  496. ==============
  497.  
  498. FUNCTION  FDATE /Ffunc /Adate /Iformat /Oformat
  499. --------  -------------------------------------------
  500. format    this is a synonym for function "f"
  501.  
  502. f         returns /Adate in format specified by /Oformat
  503.           Since /Aformat and /Oformat can be different, the FORMAT
  504.           function is used to change a date from one format to another.
  505.           Because of the wide variety of output formats, the FORMAT
  506.           function can also be used to determine the day of week of the
  507.           date, whether the date is in a normal or leap year, etc.
  508.  
  509. EXAMPLES
  510.           FDATE /Ff /A19920101 /Iccyymmdd /O"mn zd, ccyy"
  511.           FDATE /Ff       /Atoday         /Od1
  512.           FDATE /Fformat  /Atoday         /Od1
  513.           FDATE /Ff /If /Afdate.exe /P"FDATE.EXE last updated: " /Ofull
  514.  
  515.  
  516.  
  517. FUNCTION  FDATE /Ffunc /Nnumdays /Adate /Iformat /Oformat
  518. --------  -------------------------------------------
  519. add       Adds      /Ndays to   /Adate, produces date in /Oformat format
  520. sub       Subtracts /Ndays from /Adate, produces date in /Oformat format
  521.  
  522. EXAMPLES
  523.           FDATE /Fadd /N90 /A01-01-1992 /Imm-dd-ccyy /Od1
  524.           FDATE /Fsub /N90 /A01-01-1992 /Imm-dd-ccyy /Od1
  525.           FDATE /Fadd /N90 /Atoday                   /Od1
  526.  
  527.  
  528.  
  529. FUNCTION  FDATE /Ffunc /Adate /Bdate /Iformat
  530. --------  -------------------------------------------
  531. comp      compares the dates (time graularity = 1 day)
  532.           specified on the /A and /B parms.
  533.           returns         when
  534.             LT            /A  is less than    (earlier than) /B
  535.             EQ            /A  is equal to     (same as)      /B
  536.             GT            /A  is greater than (later than)   /B
  537.  
  538. tcomp     compares the times (time graularity = 1 second)
  539.           specified on the /A and /B parms.
  540.           This is useful when input format /If (file) is specified.
  541.           It can be used to compare the timestamps of two files and
  542.           determine which is older.
  543.               EXAMPLE: Fdate /Ftcomp /If /Amyfile.1 /Byourfile.1
  544.  
  545.           returns         when
  546.             LT            /A  is less than    (earlier than) /B
  547.             EQ            /A  is equal to     (same as)      /B
  548.             GT            /A  is greater than (later than)   /B
  549.  
  550. dif       Returns number of days between /Adate and /Bdate
  551.           Order of the two dates is not significant.
  552.           Note that for DIF, both dates must be in the SAME
  553.           format, the input format specified in /Iformat.
  554.           If the two dates are not in the same format, reformat one
  555.           of the dates using the /Ff function and
  556.           a utility like STRINGS or GET.
  557.  
  558. EXAMPLES
  559.           FDATE /Fdif /A01-01-1992 /B11-11-1992  /Imm-dd-ccyy
  560.           FDATE /Fdif /A11-11-1992 /B01-01-1992  /Imm-dd-ccyy
  561.           FDATE /Fdif /Atoday      /B01-01-1992  /Imm-dd-ccyy
  562.  
  563.  
  564. FUNCTION  FDATE /Ffunc /Adate /Iformat /Oformat /Ddow#  /Ndow-count
  565. --------  -----------------------------------------------------------
  566. w         W (weekday) function.
  567.           This function accepts a date specification in parm /A and
  568.           returns the date of the /Nth /Day-of-the-week
  569.           before or after /Adate.  For example:
  570.  
  571.           If    /A specifies November 14, 1992
  572.                 /D specifies the number for Thursday (i.e., 5)
  573.                 /N specifies a week count of 3
  574.           then /Fw returns the date of the third Thursday after
  575.           November 14, 1992. (See full example, below)
  576.  
  577.           Note that /N may be negative.  If, in the above example, /N
  578.           is specified as -3, then Fdate returns the date of the third
  579.           Thursday BEFORE November 14, 1992.
  580.  
  581.           If the date specified on the /A parms falls on the same day
  582.           of the week as was specified on the /D parm, then that will
  583.           be considered to be the first date meeting that day-of-week
  584.           criterion.  That is, If November 14, 1992 fell on a
  585.           Thursday, and if /N was 1 or -1, then the output date would
  586.           be the same as the input date, i.e.  November 14, 1992.
  587.  
  588.           The acceptable values for /N (number of weeks) is in
  589.           the range of 99..-99.  A value of zero (i.e. /N0) is invalid.
  590.  
  591. EXAMPLES
  592.      find date of Thanksgiving (4th Thursday in November) in 1992
  593.          FDATE /Fw /A11-01-1992 /Imm-dd-ccyy /D5 /N4 /Od1
  594.      returns: Thursday November 26, 1992
  595.  
  596.      find the beginning of the work-week (Monday, 2nd day of week)
  597.      AFTER Thanksgiving, 1992
  598.          FDATE /Fw /A11-26-1992 /Imm-dd-ccyy /D2 /N1 /Od1
  599.  
  600.      find the beginning of the work-week (Monday, 2nd day of week)
  601.      BEFORE Thanksgiving, 1992
  602.          FDATE /Fw /A11-26-1992 /Imm-dd-ccyy /D2 /N-1 /Od1
  603.  
  604.  
  605. ECHO FUNCTION
  606. =============
  607. e         Produces only the strings specified using the /P and /S
  608.           parameters.
  609.  
  610. The primary use of /Fe is to:
  611.    (1) set an environment variable to a symbol it would not
  612.        ordinarily accept (such as "=")
  613.    (2) to pipe symbols that ordinarily cannot be piped (such as the
  614.        redirection symbol ">" and the pipe symbol "|").
  615.  
  616. Other functions, such as /Ff, can also do this.  The special use
  617. of /Fe is for situations in which you don't want the output to
  618. include a date.
  619.  
  620.  
  621. EXAMPLE BATCH FILE
  622. ------------------
  623.   @ECHO OFF
  624.   set pct=%%%
  625.   Fdate /Fe /P"=Sam=" /vName
  626.   Fdate /Fe /P"echo ECHO Hi, %pct%Name%pct%!>junk2.bat">junk1.bat
  627.      :  RESULT: TEXT OF JUNK1.BAT IS
  628.      :          echo ECHO Hi, %Name%!>junk2.bat
  629.   call junk1.bat
  630.      :  RESULT: TEXT OF JUNK2.BAT IS
  631.      :          ECHO Hi, =Sam=!
  632.   call junk2.bat
  633.      :  RESULT: TEXT DISPLAYED ON SCREEN IS
  634.      :          Hi, =Sam=!
  635.   :endit
  636.  
  637.  
  638. MATH FUNCTIONS
  639. ==============
  640.  
  641. FUNCTION  FDATE /Ffunc /Anum  /Bnum
  642. --------  -------------------------------------------
  643.  
  644. #add      returns the sum of the integers specified
  645.           on the /A and /B parms.  Can be used to calculate the
  646.           "Julian" minute(second, date) in the future from a given
  647.           "Julian" minute(second, date).   Also useful in generating
  648.           sequences of numbers and looping (see EXAMPLE #11, below).
  649.  
  650. #sub      (not supported)
  651.           no numeric subtraction operation (as such) is supported.
  652.           Often, you will find that #dif will do what you want.
  653.           #dif is the same as subtraction in which the smaller
  654.           number is subtracted from the larger number; it will never
  655.           return a negative number.  If you really MUST have
  656.           subtraction, which might return a negative result, you can
  657.           add two numbers, one of which is a negative number.
  658.           For example, to subtract 3 from 2:
  659.               FDATE /F#add /A2 /B-3          [ returns: -1 ]
  660.  
  661. #dif      returns the difference between the integers specified
  662.           on the /A and /B parms.  Can be used to calculate the
  663.           number of minutes(seconds, days) between two
  664.           "Julian"  minutes(seconds, dates).
  665.  
  666. #comp     compares the integers specified on the /A and /B parms.
  667.           returns         when
  668.             LT            /A  is less    than /B
  669.             EQ            /A  is equal   to   /B
  670.             GT            /A  is greater than /B
  671.  
  672.  
  673. PUTTING FDATE OUTPUT INTO AN ENVIRONMENT VARIABLE USING /V
  674. ===========================================================
  675.  
  676. Starting with version 6.1, Fdate supports a /V (environment variable)
  677. parameter.  A user can use /V to tell Fdate to put its output directly
  678. into an environment variable. (Fdate attempts to put output into an
  679. environment variable in the master, rather than the local, environment.)
  680.  
  681. Note that due to the complexities of manipulating the environment, /V
  682. may not always work.  If you encounter a situation in which it does not,
  683. you may be able to use one of the alternative techniques described in
  684. the next section.  For a list of environments in which the /V option has
  685. been reported as NOT working, see the next section.
  686.  
  687. /Vevar tells Fdate to put output into an environmental variable
  688. whose name is "evar".  For example:
  689.  
  690.                 Fdate /Ff /Vdate1
  691.  
  692. will set the environment variable DATE1 to the current date.  If
  693. you type SET at the DOS prompt, you should see something like:
  694.  
  695.                 DATE1=Friday February 14, 1992
  696.  
  697. If you specify /V without an evar name, the evar name defaults to FDATE.
  698.  
  699. Example :       Fdate /Ff /V
  700. produces:       FDATE=Friday February 14, 1992
  701.  
  702. If you do not use /V, Fdate output is written to standard output, that
  703. is, to the screen.
  704.  
  705.  
  706.  
  707.  
  708. PUTTING FDATE OUTPUT INTO AN ENVIRONMENT VARIABLE WITHOUT USING /V
  709. ===================================================================
  710.  
  711. Manipulating the environment is an incredibly tricky business.  There
  712. are questions of the local versus master environment, the version of DOS
  713. you are running, and the environment under which you are running (DOS,
  714. Windows, Carousel).  In order to keep FDATE focussed on date-related
  715. issues, versions of Fdate prior to 6.1 did not attempt to put output
  716. directly into an environment variable.  Instead, FDATE's output was
  717. written to standard output, that is, it was displayed on the screen.
  718. Output could then be redirected to a batch file, or piped to a utility
  719. (such as STRINGS or GET), that would put the output into an environment
  720. variable.
  721.  
  722. Starting with version 6.1, Fdate supports a /V (environment variable)
  723. parameter.  A user can use /V to tell Fdate to put its output directly
  724. into an environment variable.  HOWEVER.... due to the complexities of
  725. environment manipulation, there may be circumstances where /V doesn't
  726. work.  These include running FDATE when you have shelled out to DOS from
  727. another program, have put the command processor in upper memory (UMB)
  728. (see below), are running under Windows, Carousel, etc.  In such cases,
  729. you will need to fall back on more basic methods.
  730.  
  731. One way to put FDATE's output into an environment variable is to use
  732. the /P (prefix string) feature to create a DOS "SET" statement,
  733. redirect the output to a batch file, and CALL the batch file.
  734. Since CALL first appeared in DOS 3.3, you will need DOS 3.3 or
  735. greater to use this technique.
  736.  
  737.   FDATE /Ff /Atoday /O"mn zd, ccyy" /P"@SET FDATE=" >JUNKTEMP.BAT
  738.   call JUNKTEMP.BAT
  739.   del  JUNKTEMP.BAT
  740.  
  741. There are also shareware and public domain utilities that are written
  742. specifically to manipulate environment variables, and do that job very
  743. well.  FDATE's output can be put into an environment variable by piping
  744. it to one of these utilities.  When piping FDATE output to a utility,
  745. you can prevent the output from being ECHOed to the screen by
  746. redirecting the output to NUL.
  747.  
  748.    EXAMPLE: use STRINGS to put date into DATE1 environment variable
  749.    FDATE /Ff /At /Od1 | STRINGS date1= ASK >NUL
  750.  
  751.    -----------------------------------------------------------------
  752.    I recommend Bob Stephan's GET and PC Magazine's STRINGS.
  753.  
  754.    As of February 14, 1992, the current version of GET is 2.5.
  755.    On CompuServe, use IBMFF to look for GET*.ZIP (e.g. GET25.ZIP for
  756.    version 2.5) in CIS:IBMSYS, or for GET.ZIP in ZNT:UTILFORUM, lib 16.
  757.    GET is also available from the Public Software Library in Houston.
  758.  
  759.    As of February 14, 1992, the current version of STRINGS is 1.3.
  760.    On CompuServe, look for STRING.ZIP in the PC Magazine Utilities
  761.    Lib of ZNT:UTILFORUM.  STRHYP.ZIP contains good hypertext
  762.    documentation on STRINGS.
  763.    -----------------------------------------------------------------
  764.  
  765. /V WHEN USING 4DOS, NDOS, AND UMB
  766. =================================
  767.     --------------------------------------------------------------
  768.     I have received the following report from Aran Spence about
  769.     circumstances in which FDATE /V will not set a variable
  770.     in the master environment.  This report leads me to believe
  771.     that FDATE /V may also fail to work with MS-DOS if you put
  772.     the command processor or the environment in Upper Memory.
  773.     --------------------------------------------------------------
  774. Steve,
  775.  
  776. There are options with 4DOS and NDOS to load the environment and part
  777. of the command processor into upper memory blocks.  When one of these
  778. options is used, FDATE /V can't find the environment and produces the
  779. message:
  780.  
  781.    ERROR
  782.    echo ERROR: Master environment not found
  783.    pause
  784.  
  785. If you have a 4DOS.INI file, it has to contain these lines for FDATE /V
  786. to work:
  787.  
  788.    UMBEnvironment = No
  789.    UMBLoad = No
  790.  
  791. If you have NDOS, the SHELL statement in CONFIG.SYS cannot contain
  792. any reference to UMB loading via /U (which puts NDOS.COM in UMB), nor
  793. can it contain a statement of the form:
  794.                 /E:xxxU
  795. (which puts xxx bytes of the environment in UMB via the "U" parameter).
  796.  
  797. Also, NSTART.BTM or 4START.BTM cannot contain
  798.          SET NDSHELL=/e+xxxU /U
  799. in which both U's represent UMB loading of the command processor and the
  800. environment during secondary shells.
  801.  
  802.  
  803. =======================================================================
  804. EXAMPLE #1
  805. Redirect FDATE output to a file, or to a callable batch file,
  806. or pipe it to STRINGS or GET to store it in an environment variable
  807. =======================================================================
  808. rem display Fdate output on screen
  809. FDATE /Ff /At /Od1 /P"Today is "
  810.  
  811. rem Redirect FDATE output to a file
  812. FDATE /Ff /At /Od1 /P"Today is " >FDATE.OUT
  813.  
  814. rem Redirect FDATE output to a callable batch file
  815. FDATE /Ff /Atoday /O"mn zd, ccyy" /P"@SET DATE1=" >JUNKTEMP.BAT
  816. call JUNKTEMP.BAT
  817. del  JUNKTEMP.BAT
  818.  
  819. rem Pipe FDATE output to STRINGS to store it in DATE1 environment var
  820. FDATE /Ff /Atoday /O"mn zd, ccyy" |STRINGS date1= ASK >NUL
  821.  
  822. rem Pipe FDATE output to GET to store it in DATE1 environment var
  823. FDATE /Ff /Atoday /O"mn zd, ccyy" |GET ZE /Vdate1 >NUL
  824.  
  825.  
  826.  
  827. =======================================================================
  828. EXAMPLE #2
  829. Find the difference (in days) between two dates in different formats
  830. Use GET to put FDATE output into environment variables.
  831. =======================================================================
  832. set date1=05-10-1992
  833.  
  834. rem reformat date literal into same format as date1
  835. FDATE /Ff /Imm-dd-yy   /A05-08-92 /Omm-dd-ccyy | GET ZE /Vdate2>NUL
  836.  
  837. rem get difference between date1 and date2
  838. FDATE /Fdif /Imm-dd-ccyy /A%date1%  /B%date2%| GET ZE /vdiff>NUL
  839.  
  840. echo The difference is %diff% days.
  841.  
  842.  
  843.  
  844.  
  845. =======================================================================
  846. EXAMPLE #3
  847. Schedule a program to run at a specified time in the future.  Note that
  848. this involves a lot of disk activity because DOS re-reads the batch
  849. file from disk every time it does a GOTO LOOPTOP.  If you do this, it
  850. is a good idea to run the batch file from a RAM DISK.
  851. =======================================================================
  852. REM GET CURRENT JULIAN MINUTE AND PUT IN ENVIRONMENT VARIABLE RUNTIME
  853. FDATE /Ff /At /Ominute#  |STRINGS RunTime= ASK >NUL
  854.  
  855. REM ADD 120 MINUTES (2 HOURS) TO ENVIRONMENT VARIABLE RUNTIME
  856. FDATE /F#add /A%RunTime% /B120 |STRINGS RunTime= ASK >NUL
  857.  
  858. REM LOOP UNTIL NOWTIME HAS REACHED RUNTIME
  859. :LoopTop
  860.   FDATE /Ff /At  /Ominute#   |STRINGS NowTime=  ASK >NUL
  861.   FDATE /F#comp  /A%NowTime% /B%RunTime% |STRINGS TimeComp= ASK >NUL
  862.   if (%TimeComp%)==(LT) goto loopTOP
  863. :LoopEnd
  864.  
  865. echo STARTING EXECUTION OF APPLICATION: [program name]
  866.  
  867.  
  868.  
  869. =======================================================================
  870. EXAMPLE #4
  871. Rename file BACKUP.LOG to a name that contains today's date
  872. =======================================================================
  873. FDATE /Ff /Atoday /Oyymmdd /P"@SET DATE1=" >JUNKTEMP.BAT
  874. call JUNKTEMP.BAT
  875. del  JUNKTEMP.BAT
  876. ren  BACKUP.LOG  BK%DATE1%.LOG
  877. SET  DATE1=
  878.  
  879.  
  880.  
  881. =======================================================================
  882. EXAMPLE #4b
  883. Use FDATE to rename a log file to a name that will be unique within a
  884. minute time-frame.  This is a way to keep an historical record of a
  885. series of log files.  Since the file will retain its original date/time
  886. stamp, you will still be able easily to tell when it was created.
  887. In this example, we use GET to put the FDATE output into
  888. environment variable TEMPVAR.
  889. =======================================================================
  890. FDATE /FF /At /Ominute# | GET ZE /Vtempvar >nul
  891. REN online.log %tempvar%.log
  892. SET tempvar=
  893.  
  894.  
  895.  
  896. =======================================================================
  897. EXAMPLE #5
  898. Find calendar date corresponding to Julian date 1992:045
  899. =======================================================================
  900. FDATE /Ff /A1992045  /Iccyyjjj  /Od1
  901.  
  902.  
  903.  
  904. =======================================================================
  905. EXAMPLE #6
  906. Check to see if parameter %1 is a valid year (CCYY)
  907. =======================================================================
  908. @echo off
  909. rem determine if value sent in through parameter %1 is a valid year
  910. Fdate /Ff /Imm-dd-ccyy /A01-01-%1 /Od1 >nul
  911. if errorlevel 1 echo Parm 1 was not a valid year: %1
  912. if errorlevel 1 goto endit
  913.  
  914. echo PUT YOUR BATCH PROCESSING HERE, USING YEAR VALUE OF: %1
  915.  
  916. :endit
  917.  
  918.  
  919.  
  920. =======================================================================
  921. EXAMPLE #7
  922. Find the 4th Thursday in November (Thanksgiving)
  923. =======================================================================
  924. Fdate /Fw /D5 /N4 /A11-01-%year% /Imm-dd-ccyy /Od1 /P"Thanksgiving: "
  925.  
  926.  
  927.  
  928. =======================================================================
  929. EXAMPLE #8
  930. Show the number of the anniversary for some special event.
  931. =======================================================================
  932. SEE HOLIDAYS.BAT
  933.  
  934.  
  935. =======================================================================
  936. EXAMPLE #9
  937. Run a program once a day, when you boot for the first time that day.
  938. =======================================================================
  939. @echo off
  940. cls
  941.  
  942. REM -------------------------------------------------------------------
  943. REM Run daily processing once a day.  Put this code in AUTOEXEC.BAT.
  944. REM This batch file requires DOS 3.3+, since it uses CALL.
  945. REM -------------------------------------------------------------------
  946. if not exist LastRun.BAT goto RunNow
  947. REM LastRun.Bat will set env var LASTRUN to date AUTOEXEC was last run.
  948. call LastRun.BAT
  949.  
  950. REM Compare today's date to date in LASTRUN
  951. Fdate /Fcomp /Imm-dd-ccyy /At /B%LastRun% /P"@set COMP=">junktemp.BAT
  952. call junktemp.BAT
  953. del  junktemp.BAT
  954.  
  955. IF (%COMP%)==(EQ) goto NoRun
  956. REM if user reset system clock, today's date may be less than LASTRUN
  957. IF (%COMP%)==(LT) goto NoRun
  958.  
  959. rem Daily processing hasn't been run today. Run it.
  960.  
  961. echo RUNNING ONCE A DAY PROCESSING: Job 1
  962. echo RUNNING ONCE A DAY PROCESSING: Job 2
  963. echo RUNNING ONCE A DAY PROCESSING: ............. etc.
  964.  
  965. rem ------------------------------------------------------------------
  966. rem Save today's date in a new version of LastRun.BAT
  967. rem Note that this will be executed only if daily processing runs to
  968. rem completion without hanging the machine or aborting the batch file.
  969. rem ------------------------------------------------------------------
  970. Fdate /Ff /Omm-dd-ccyy /At /P"@set LastRun=">LastRun.BAT
  971.  
  972. :NoRun
  973. set LastRun=
  974. set COMP=
  975.  
  976. =======================================================================
  977. EXAMPLE #10
  978. Use the ability to compare a file's date to today's date to
  979. display a list of all files that were created/updated today.
  980. See also demo batch file FILEDATE.BAT
  981. =======================================================================
  982. @echo off
  983. if (%1)==(SUBROUTINE1) goto %1
  984.  
  985. CLS
  986. ECHO THE FOLLOWING FILES WERE CREATED/UPDATED TODAY
  987. REM  the batch file calls itself, and passes control to SUBROUTINE1
  988. REM  which will display the filename if the file was updated today
  989. for %%v in (*.*) do  CALL %0 SUBROUTINE1 %%v
  990.  
  991. set comp=
  992. del JUNKTEMP.BAT
  993. goto endit
  994.  
  995. :SUBROUTINE1
  996. rem Note that when SUBROUTINE1 is executed, %2 will contain a filename
  997. rem Compare today's date to the date on the %2 file
  998. Fdate /Fcomp /If /At /B%2 /P"@set COMP=">JUNKTEMP.BAT
  999. CALL JUNKTEMP.BAT
  1000.  
  1001. rem Echo the filename if the file was created/updated today
  1002. if (%comp%)==(EQ) echo %2
  1003. :endit
  1004.  
  1005.  
  1006. =======================================================================
  1007. EXAMPLE #11
  1008. Use #add function to loop through an array of subscripted
  1009. environment variables.
  1010. =======================================================================
  1011. @echo off
  1012. cls
  1013. SET pct=%%%
  1014. SET prefix=Address
  1015.  
  1016. ECHO LOADING AN ARRAY
  1017. SET subscript=1
  1018. SET %prefix%.%subscript%=Stephen Ferg
  1019. SET subscript=2
  1020. SET %prefix%.%subscript%=5113 N. 8th Road
  1021. SET subscript=3
  1022. SET %prefix%.%subscript%=Arlington, VA 22205
  1023.  
  1024. ECHO UNLOADING AND DISPLAYING THE ARRAY
  1025. SET subscript=1
  1026. :LoopTop
  1027. REM do while subscript less than/equal 3
  1028. if %subscript%==4 goto LoopEnd
  1029.  
  1030.    REM put value of subscripted variable into tempvar
  1031.    ECHO SET tempvar=%pct%%prefix%.%subscript%%pct%>JUNKTEMP.BAT
  1032.    CALL JUNKTEMP.BAT
  1033.  
  1034.    REM display value of subscripted variable
  1035.    ECHO %prefix%.%subscript% is: %tempvar%
  1036.  
  1037.    REM delete subscripted variable
  1038.    SET %prefix%.%subscript%=
  1039.  
  1040.    REM increment the loop variable
  1041.    Fdate /F#add /A%subscript% /B1 /Vsubscript
  1042.    goto LoopTop
  1043. :LoopEnd
  1044.  
  1045. SET pct=
  1046. SET tempvar=
  1047. SET prefix=
  1048. SET subscript=
  1049. DEL JUNKTEMP.BAT
  1050.  
  1051.  
  1052. FDATE'S ALGORITHMS
  1053. ==================
  1054.  
  1055.  
  1056. FDATE IS DESIGNED FOR BUSINESS, NOT HISTORICAL, APPLICATIONS
  1057. ============================================================
  1058. FDATE is intended for business applications, not historical ones.
  1059. As far as FDATE is concerned, the calendar has followed the same
  1060. pattern, unchanged, since January 1, 0001.
  1061.     -------------------------------------------------------------------
  1062.     FDATE does not take into account historical changes in the calendar
  1063.     such as the glitch in English dates that occurred when Britain
  1064.     moved from the Julian to Gregorian calendar in the 18th century,
  1065.     or Russia made the same move in the early 20th century.
  1066.     -------------------------------------------------------------------
  1067.  
  1068.  
  1069. FDATE'S BASE DATE
  1070. =================
  1071.   Internally, date manipulations are based on translating a calendar
  1072.   date into an "absolute" or "TRUE Julian" date:  a date expressed
  1073.   as the number of days from some day in the distant past.
  1074.   FDATE's base date is January 1, 0001 (i.e. day 1 of month 1 of year 1)
  1075.   FDATE's absolute date for January 1, 0001 is      1.
  1076.   FDATE's absolute date for January 1, 1992 is 727198.
  1077.  
  1078.  
  1079. FDATE'S LEAP YEAR ALGORITHM
  1080. ===========================
  1081.     Every year evenly divisible by 4 IS a leap year
  1082.       EXCEPT THAT
  1083.         Every year evenly divisible by 100 IS NOT a leap year
  1084.           EXCEPT THAT
  1085.             Every year evenly divisible by 400 IS a leap year
  1086.     .
  1087.     Using this algorithm
  1088.          1983  is not a leap year
  1089.          1984  is     a leap year
  1090.          1900  is not a leap year
  1091.          2000  is     a leap year
  1092.  
  1093.     See "A Machine Algorithm for Processing Calendar Dates", by
  1094.          Henry F. Fliegel (Georgetown University Observatory) and
  1095.          Thomas C. Van Flandern (U.S. Naval Observatory)
  1096.          COMMUNICATIONS OF THE ACM, Volume 11, Number 10, October 1968
  1097.  
  1098. There is supposedly a new adjustment to the leapyear algorithm,
  1099. which specifies the additional exception:
  1100.  
  1101.               EXCEPT THAT
  1102.                 Every year evenly divisible by 4000 IS a leap year
  1103.  
  1104. See "Bit By Bit" column, COMPUTER LANGUAGE, November 1989, p. 148.
  1105. This adjustment is not part of FDATE's leapyear algorithm.
  1106. Unless your application is working with dates 2,000 years in the
  1107. future, the lack of this exception will be irrelevant for you.
  1108.  
  1109. DEMONSTRATION BATCH FILES
  1110. =========================
  1111.    FDATE ships with a number of demonstration batch files.  These are
  1112.    sample applications that illustrate some of the ways that FDATE
  1113.    might be used to build applications.  They can be studied for
  1114.    ideas for ways of using FDATE.  They can also be used "as is", or
  1115.    copied and customized to build applications that meet your own
  1116.    special needs.
  1117.  
  1118.  
  1119.  
  1120.  
  1121.  
  1122. DEMONSTRATION BATCH FILE: HOLIDAYS.BAT
  1123. ======================================
  1124.  
  1125. HOLIDAYS without any parameters displays events in current year.
  1126. HOLIDAYS with a year parameter  displays events in that    year.
  1127.  
  1128.    EXAMPLE: HOLIDAYS               displays events in current year
  1129.    EXAMPLE: HOLIDAYS 1999          displays events in year 1999.
  1130.  
  1131. As the holidays are displayed, you can dump each screen display
  1132. to a printer by pressing SHIFT+PRINTSCREEN.
  1133.  
  1134.  
  1135.  
  1136. DEMONSTRATION BATCH FILE: ALARM
  1137. ===============================
  1138. ALARM.BAT is like a simple alarm clock for your PC.  ALARM.BAT waits
  1139. until a specified time, then triggers an alarm: it beeps and displays a
  1140. message.  It continues until someone presses CONTROL-BREAK.
  1141.  
  1142. If you enter just "ALARM" at the DOS prompt, without any parameters,
  1143. ALARM displays a HELP screen that shows how to use it.
  1144.  
  1145. ALARM uses ANSI control codes to control screen color and cursor
  1146. placement, so it requires ANSI.SYS in order to work properly.
  1147. If you are not using ANSI.SYS, it will display some garbage
  1148. characters on your screen unless you modify the batch file to remove
  1149. the ANSI control codes.
  1150.  
  1151.  USAGE   : ALARM                      shows current time in hhmm format
  1152.  USAGE   : ALARM hhmm [msg]           waits until hhmm, then sounds an alarm
  1153.  
  1154.  EXAMPLE : ALARM 0930                 [sounds alarm at 9:30 am]
  1155.  EXAMPLE : ALARM 930 Staff meeting    [sounds alarm at 9:30 am]
  1156.  EXAMPLE : ALARM 1800                 [sounds alarm at 6:00 pm]
  1157.  
  1158.            For midnight, specify 0000 or 2400 for hhmm.
  1159.  EXAMPLE : ALARM 2400  START MIDNIGHT BATCH RUN
  1160.  
  1161. The first thing that ALARM.BAT does is to change to the M: drive.  M:
  1162. is presumed to be a RAM disk.   Before you can use ALARM.BAT, you
  1163. should use your favorite text editor to change the RAM disk designation
  1164. to point to your own RAM disk.  It is possible to run ALARM.BAT from a
  1165. normal hard disk or floppy, but because ALARM.BAT does a LOT of disk
  1166. activity, it is strongly recommended that you make your current
  1167. directory a RAM disk before running it.
  1168.  
  1169. To prevent repeated disk accesses to find the FDATE program, you
  1170. should also have FDATE on the RAM disk, or be using a cache.
  1171.  
  1172. USING ALARM TO CREATE RUN-IT
  1173. ============================
  1174.  
  1175. You can copy ALARM.BAT to another batch file (say, RUN-IT.BAT) and
  1176. modify it so that rather than sounding an alarm it triggers other
  1177. activiites instead: runs a program or programs, or chains to another
  1178. batch file, for example.
  1179.  
  1180. To create a generalized RUN-IT.BAT, you could use the words of the
  1181. message to pass in the name of a batch file that you want to be run at
  1182. a certain time, along with its parameters.  Make the triggered activity
  1183. this:
  1184.  
  1185.     rem Note that earlier SHIFT has moved batch file name to parm 1.
  1186.     rem run %1 batch file.
  1187.     %1 %2 %3 %4 %5 %6 %7 %8 %9
  1188.  
  1189. Then entering this at the DOS prompt:
  1190.  
  1191.     RUN-IT 0001 BACKUP.BAT C: D: E:
  1192.  
  1193. would cause RUN-IT to wait until 1 minute past midnight, then
  1194. run a batch file called BACKUP.BAT to backup drives C:, D:, and E:.
  1195.  
  1196.  
  1197. DEMONSTRATION BATCH FILE: TIC.BAT
  1198. =================================
  1199.  
  1200. TIC.BAT is a sample application that uses FDATE to create a "tickler
  1201. file" batch file.  The default name for the file is C:\TICKLER.BAT.
  1202.  
  1203. In order to use TIC on a regular basis, you should:
  1204.  
  1205.    * Use your favorite text editor to modify TIC.BAT so that it
  1206.      will use your favorite text editor in the EDIT function.
  1207.      (TIC.BAT ships with the editor set to SPFPC).
  1208.  
  1209.    * If you wish, use your favorite text editor to modify the
  1210.      first few lines of TIC.BAT, so the "SET TicBAT=" statement
  1211.      sets TicBAT to a different file name for the tickler batch file.
  1212.      Note that you must specify the full filename,
  1213.      including path and extension.
  1214.  
  1215.    * Put TIC.BAT in a directory that is in your PATH.
  1216.  
  1217.    * add the following lines to your AUTOEXEC.BAT file:
  1218.  
  1219.          CLS
  1220.          rem show today's appointments
  1221.          call TIC T
  1222.          echo.
  1223.  
  1224.          rem show tomorrow's appointments [note space betwee T and +1]
  1225.          call TIC T +1
  1226.          echo.
  1227.  
  1228.          pause
  1229.  
  1230.      This will cause the tickler batch file to be run when you
  1231.      boot your computer, showing you your scheduled appointments.
  1232.  
  1233. HELP
  1234. ====
  1235. Running TIC without any parms will cause it to display a HELP screen.
  1236.   EXAMPLE: tic
  1237.  
  1238.  
  1239. ADDING A NEW TICKLE (SINGLE DATES)
  1240. ==================================
  1241. To add a new SINGLE DATE tickle, invoke TIC.  The first parm must be the
  1242. date of the desired tickle, in the format mm/dd/yy.  (You may use the
  1243. pseudodate TT for the current month or year, if you wish.)
  1244.  
  1245. This parm must be followed by a description of the appointment.
  1246.   * If no description is entered, TIC interprets the date in parm 1
  1247.     as a request to display the tickles for that date.
  1248. NOTE: DOS batch files strip commas out of their input parameters, so
  1249. any commas in your description will be lost.
  1250.  
  1251.   EXAMPLE: tic 5/5/92 Cinco de Mayo party w/ Susan: El Charro @ 6pm
  1252.   EXAMPLE: tic 5/5/tt Cinco de Mayo party w/ Susan: El Charro @ 6pm
  1253.  
  1254.  
  1255. ADDING A NEW TICKLE (REGULAR WEEKLY APPOINTMENTS)
  1256. =================================================
  1257. To add a new REGULAR APPOINTMENT tickle, invoke TIC.  The first two
  1258. parms must be the string "dow" (or "DOW") and the day-of-the-week
  1259. number of the day of the week (e.g. 2 for Monday).
  1260.  
  1261. These parms should be followed by a description of the appointment.
  1262.  
  1263.   EXAMPLE: tic dow 2 Regular Monday morning staff meeting @ 8:30 am
  1264.   EXAMPLE: TIC DOW 6 STANDING TENNIS DATE WITH JANICE AT 6:30
  1265.  
  1266.  
  1267. CHECKING YOUR TICKLES
  1268. =====================
  1269. You can check your tickler file appointments for a particular day at
  1270. any time by invoking TIC with only a date parm or the pseudodate T or
  1271. TODAY.
  1272.  
  1273.   EXAMPLE: tic t         displays appointments for today
  1274.   EXAMPLE: tic today     displays appointments for today
  1275.   EXAMPLE: tic 5/5/92    displays appointments for May 5, 1992
  1276.   EXAMPLE: tic 5/5/tt    displays appointments for May 5 of this year
  1277.   EXAMPLE: tic tt/5/tt   displays appointments for the 5th of this month
  1278.  
  1279. You can check your tickler file appointments for a date from one to
  1280. seven days in the future by invoking TIC with two parms: T (for today)
  1281. followed by a number of +1 through +7.  Unsigned numbers are treated
  1282. as if they have a plus sign.  Negative numbers will show appointments
  1283. for days in the past.
  1284.  
  1285.   EXAMPLE: tic t      displays appointments for today
  1286.   EXAMPLE: tic t  1   displays appointments for tomorrow
  1287.   EXAMPLE: tic t +1   displays appointments for tomorrow
  1288.   EXAMPLE: tic t +7   displays appointments for a week from today
  1289.   EXAMPLE: tic t -1   displays appointments for yesterday
  1290.  
  1291. Note that the space between the first parm "T" and the second, number
  1292. parm, is required:
  1293.  
  1294.   EXAMPLE: tic t+2    does not recognise "t+2" as "t +2".
  1295.                       Displays appointments for TODAY.
  1296.  
  1297. If the tickler batch file does not exist, nothing will be displayed.
  1298.  
  1299. REMOVING DEAD TICKLES
  1300. =====================
  1301. After a while the tickler batch file will become very long, filled with
  1302. "dead tickles".  You can edit it with a text editor to remove the dead
  1303. tickles:
  1304.  
  1305.   EXAMPLE: tic edit
  1306.   EXAMPLE: TIC ED
  1307.  
  1308. or simply delete it and let TIC create a new one the next time
  1309. you use TIC to add a tickle.
  1310.  
  1311. USE AND DISTRIBUTION OF FDATE
  1312. =============================
  1313.  
  1314. FDATE is freeware, or what is known as "zero-cost shareware".
  1315. FDATE is not what is technically called "public domain" software
  1316. because the author retains the copyright.  FDATE can, however,
  1317. be copied, used, and distributed freely as long as both FDATE.EXE
  1318. and its associated doc file (FDATE.DOC) and its demonstration batch
  1319. files (FDATEX.BAT, HOLIDAYS.BAT, TIC.BAT, ALARM.BAT) are not altered
  1320. and are distributed together.
  1321.  
  1322. FDATE can be included in shareware packages as long as both FDATE and
  1323. its related files are included in the shareware package.
  1324.  
  1325. If you have received FDATE as part of some larger shareware package,
  1326. please be aware that you may freely use, copy, and distribute FDATE
  1327. without paying a fee for, or registering, the larger package.
  1328.  
  1329. The author explicitly disavows any claim whatsoever about the
  1330. correctness or functionality of FDATE, its documentation, and its
  1331. demonstration batch files, and disclaims liability for anything and
  1332. everything bad that might happen in connection with, before, during, or
  1333. after using it.  I have tried to make FDATE work right, but everybody
  1334. makes mistakes, so you use FDATE at your own risk.
  1335.  
  1336. I don't know if people will find FDATE useful, and I'd like to find
  1337. out.  If you find FDATE useful and use it on a regular basis, I'd
  1338. appreciate it if you would drop me a short note via US mail or
  1339. CompuServe, telling me about how you are using FDATE.
  1340.  
  1341. If you need other input/output formats, or if you need a different
  1342. leapyear algorithm, please contact the author.
  1343.  
  1344.  
  1345.  
  1346.  
  1347. UPDATES AND CURRENT VERSION OF FDATE
  1348. ====================================
  1349.  
  1350. You will always be able to find the most recent version of FDATE on
  1351. CompuServe.  The filename will be FDATE.ZIP, and it will be available
  1352. in one of the libraries in the CIS:IBMSYS forum (probably library 1).
  1353. You can find it by using cross-library searching, looking for the
  1354. filename FDATE.ZIP or the keyword FDATE.
  1355.  
  1356. Feel free to post copies of FDATE.ZIP on any BBS that you wish, but
  1357. please do not upload it to any CompuServe library.  As long as I am the
  1358. only one putting copies of FDATE onto CompuServe, we can keep confusion
  1359. over versions to a minimum.
  1360.  
  1361. The current distribution package (FDATE.ZIP) contains the following:
  1362.  
  1363.        FDATE.EXE         [the FDATE program]
  1364.        FDATE.DOC         [this file, documentation for FDATE]
  1365.  
  1366.   [demonstration batch files]
  1367.        FDATEX.BAT
  1368.        HOLIDAYS.BAT
  1369.        ALARM.BAT
  1370.        DO-ONCE.BAT
  1371.        FILEDATE.BAT
  1372.        TIC.BAT
  1373.  
  1374.  
  1375. FDATE REVISION HISTORY
  1376. ======================
  1377.  
  1378. Letters appended to version numbers indicate modifications to
  1379. the doc files, without any modification to the FDATE.EXE software.
  1380. Asterisks (*) indicate most important changes in the new version.
  1381.  
  1382.  
  1383. FDATE REVISION HISTORY
  1384. ======================
  1385.  
  1386. Letters appended to version numbers indicate modifications to
  1387. the doc files, without any modification to the FDATE.EXE software.
  1388. Asterisks (*) indicate most important changes in the new version.
  1389.  
  1390. 1.1   Oct 01, 1991
  1391.       First version of FDATE
  1392.  
  1393. 1.2   Oct 15, 1991
  1394.       Replaced shareware date routines with Ferg routines
  1395.       NOTE THAT THERE IS NOT MUCH ERROR-CHECKING IN THIS VERSION.
  1396.  
  1397. 1.2d  Oct 16, 1991
  1398.       Minor changes to show redirection and piping of FDATE output
  1399.       Revised discussion of how FDATE may be distributed.
  1400.       Added note on business-related, non-historical purpose of FDATE
  1401.       Added note on 4000-year leap-year exception
  1402.  
  1403. 1.2e  Oct 17, 1991
  1404.       Added note on why FDATE doesn't directly set an Env variable
  1405.  
  1406. 2.0a  Nov 05, 1991
  1407.       Modified Help display to show parameters and their meanings
  1408.       Added output format YYMMDD
  1409.       Added output format minute# and second#
  1410.       Added function #dif
  1411.       Added test of GET and STRINGS      to FDATEX.BAT
  1412.       Added test of minute# and second#  to FDATEX.BAT
  1413.  
  1414. 2.1a  Nov 06, 1991
  1415.       Added /P parameter and modified documentation accordingly
  1416.       Added JULDATE output format
  1417.       Minor changes and reformatting to documenation
  1418.  
  1419. 2.2a  Nov 08, 1991
  1420.       Added example showing how to put current date in a filename
  1421.       Added MMDD output formats
  1422.  
  1423. 2.3a  Nov 09, 1991
  1424.       Added /L (language parameter) to allow French-language output
  1425.       Added the following output formats
  1426.          full
  1427.          "mn3 zd, ccyy"
  1428.          "zd mn, ccyy"
  1429.          "zd mn ccyy"
  1430.          European-style date formats
  1431.                in which day occurs before month (e.g. dd/mm/ccyy)
  1432.  
  1433. 2.4a  Nov 10, 1991
  1434.       Fixed display of time in /Ofull so that a minutes value of
  1435.             less than 10 would display with a leading zero:
  1436.             e.g. "10:08 am" instead of "10:8 am".
  1437.  
  1438. 2.5a  Nov 13, 1991
  1439.       Added output format CCYYMM
  1440.  
  1441. 2.6a  Nov 25, 1991
  1442.       Added function "F" (/Ff) as an synonym for /Fformat
  1443.       Split FDATEX.BAT off from FDATE.DOC into its own file
  1444.  
  1445. 2.6b  Dec 02, 1991
  1446.       Modified this doc file to reflect new /Ff feature
  1447.  
  1448. 2.7a  Dec 07, 1991
  1449.       Added CompuServe-style output format: dd-mn3-yy.
  1450.                                    Example: 07-Dec-91
  1451.  
  1452. 2.8a  Dec 08, 1991
  1453.       Added output format d1.    Example:  Saturday December 7, 1991
  1454.       Added output format t1.    Example:  9:05 am
  1455.       Added "t" alias for "today" pseudodate.
  1456.  
  1457.       Corrected FDATE "help" display which had incorrectly shown
  1458.          dd-mn3-yy as an input (rather than an output) format.
  1459.       Modified documentation and FDATEX.BAT to reflect software changes.
  1460.       Extensively re-wrote and re-arranged FDATEX.BAT to make it
  1461.          more user-friendly.
  1462.       In documentation:
  1463.          corrected the formats for European dates, which had incorrectly
  1464.          been shown as having the same format as American dates.
  1465.  
  1466. 2.8b  Dec 09, 1991
  1467.       In documentation:
  1468.          Added example showing how to use fdate to create a
  1469.          time-stamped filename.
  1470.  
  1471. 2.9a  Dec 26, 1991
  1472.       Added STRINGS and GET info to HELP screen.
  1473.       In documentation:
  1474.          Added example: how to find calendar date of Julian date
  1475.  
  1476. 3.0a  Dec 27, 1991
  1477. *     =============== MAJOR BUG FIX ==============================
  1478. *     Fixed bug in TRUEDATE date arithmetic routine that caused
  1479. *     incorrect dates to be returned for the last 2 or 3 days of
  1480. *     some months.
  1481. *     ============================================================
  1482.       Added output formats ccyy, hh:mm, and hh:mm:ss.
  1483.       Replaced output format JULDATE with JULIAN
  1484.              JULDATE retained for compatibility, but not documented.
  1485.       Modified this doc file and FDATEX.BAT accordingly.
  1486.  
  1487. 3.1a  Dec 28, 1991
  1488.       Fixed bug: error messages were ignoring the /P parm
  1489.       added HOLIDAYS.BAT to distribution package
  1490.       Replaced output format LEAPYR with LY
  1491.              LEAPYR retained for compatibility, but not documented.
  1492.       Added new feature: when an error is detected:
  1493.              output string is "ERROR", and
  1494.              errorlevel is set to 1.
  1495.       Changed assumed century on input formats that require only YY.
  1496.              Now, if year is LT/EQ 20, a century of 20 is assumed.
  1497.              FDATE will now be able to function nicely until year 2020.
  1498.       Modified this doc file and FDATEX.BAT accordingly.
  1499.  
  1500. 3.2a  Dec 29, 1991
  1501.       Added COMP (date compare) function
  1502.       Added RUN-ONCE-A-DAY example, which uses new COMP function
  1503.       Added error-trapping for dates before year 1 and after year 9999.
  1504.       Fixed minor error in HELP screen (dif does NOT require /O).
  1505.       Modified this doc file and FDATEX.BAT accordingly.
  1506.  
  1507. 3.2b  Dec 30, 1991
  1508.       Fixed two bugs in this doc file. (Thanks to Luther Schliesser
  1509.          for the bug report.)   My phone number was wrong, and the
  1510.          values returned by the leapyear function (0,1) were reversed.
  1511.       Fixed my phone number in the HELP screen.
  1512.       Minor changes in the examples in this DOC file.
  1513.  
  1514. 3.2c  Dec 31, 1991
  1515.       Fixed bug in HOLIDAYS.BAT that showed New Year's Eve when
  1516.             it should have showed New Year's Day.
  1517.             (Thanks to Luther Schliesser for ANOTHER bug report.)
  1518.       Modified HOLIDAYS.BAT to show Easter-related holidays 1992-2000
  1519.       Modified HOLIDAYS.BAT to give an example of calculating
  1520.           anniversaries for a user-specified "special date" (SD)
  1521.  
  1522. 4.1a  Jan 03, 1992
  1523. *     Added ability to accept TT, TT, and TTTT
  1524.             as pseudodates for current MM, DD, and CCYY.
  1525. *     Added function: W  (i.e. /Fw)
  1526.       Modified this doc file, FDATEX.BAT, and HOLIDAYS.BAT accordingly.
  1527.  
  1528.       Modified HOLIDAYS.BAT to use new /Fw to show Thanksgiving.
  1529.       Added Luther Schliesser's anniversary code to HOLIDAYS.BAT
  1530.       Added note on elimination of multiple spaces from /P strings.
  1531.       Added note showing how to use #add and negative number to do
  1532.             true subtraction.
  1533.       Added note: UPDATES AND CURRENT VERSION OF FDATE
  1534.  
  1535. 4.2a  Jan 04, 1992
  1536.       In FDATE.EXE:
  1537.       Minor change to improve readability of an error message
  1538.  
  1539.       In FDATE.DOC:
  1540. *     expanded discussion of how to check for errors using FDATE
  1541.       added documentation for TIC.BAT
  1542.  
  1543.       In HOLIDAYS.BAT:
  1544.       added Easter days for 1991 and 2001, Epiphany, Pentecost, etc.
  1545.       fixed bug in algorithm for Ash Wednesday (thanks to L. Schliesser)
  1546.       changed "Memorial Day"            , May 30
  1547.            to "Memorial Day (observed)" , the last Monday in May
  1548.       inspired by L.S.'s tickler for Sharon's birthday, added "tickler"
  1549.            for 500th anniversary of Columbus' discovery of America
  1550.  
  1551.       Added TIC.BAT to FDATE distribution ZIP file
  1552.       Started practice of highlighting important changes with "*"
  1553.  
  1554. 4.2b  Jan 06, 1992
  1555.       In HOLIDAYS.BAT:
  1556.          Corrected algorithm for Advent (thanks to L. Schliesser)
  1557.          Advent is the 4 Sundays BEFORE, but NOT including, Christmas.
  1558.          (The error would not make any difference before 1994)
  1559.  
  1560. 4.2c  Jan 07, 1992
  1561.       In HOLIDAYS.BAT:
  1562.          Added LABOR DAY (thanks to L.S.)
  1563.       In TIC.BAT
  1564. *        Added ability to add regular day-of-week appointments
  1565. *        Added EDIT function to make it easy to edit TICKLER.BAT
  1566.          Removed 18-word limit on appointment descriptions
  1567.          Added ANSI.SYS codes to make help screen show in color
  1568.  
  1569. 4.3a  Jan 12, 1992
  1570. *     Added defaults for: /Adate,  /Bdate,  /I and         /O
  1571.             defaults are: /Atoday, /Btoday, /Imm-dd-ccyy , /Od1
  1572. *     Added British-style output format, e.g. 1.15.1992 (Jan 15, 1992)
  1573. *     Added output formats: dd, zd, hhmm, hhmmss
  1574.  
  1575.       Added ability to process +1..+5 to TIC.BAT
  1576.       added ALARM.BAT to FDATE.ZIP distribution package
  1577.  
  1578. 4.4a  Jan 20, 1992
  1579. *     Added /S, suffix string parameter
  1580.       modified CMDLIN unit to handle empty parms (e.g. /A ) better
  1581.       Added Black History Month to HOLIDAYS.BAT to demonstrate /S
  1582.  
  1583. 4.4b  Jan 22, 1992
  1584.       In TIC.BAT:
  1585.       Fixed ability to list by date, which had been messed up when
  1586.          adding ability to accept +1, etc. as parms
  1587.  
  1588. 4.5a  Jan 27, 1992
  1589. *     Added julian formats JJJ, YYJJJ, CCYYJJJ
  1590.       Made HELP screen display in bright white on blue
  1591.  
  1592. 4.6a  Jan 27, 1992
  1593.       Fixed problem that prevented output from being redirected
  1594.  
  1595. 4.7a  Jan 28, 1992
  1596.       Made HELP screen display in yellow & white
  1597.  
  1598. 4.8a  Jan 28, 1992
  1599.       Added /D documentation to HELP screen display and FDATE.DOC
  1600.  
  1601. 5.1a  Feb 09, 1992
  1602. *     Added julian INPUT formats yyjjj and CCyyjjj
  1603.       Added documentation on Fdate's century-assumption algorithm
  1604.  
  1605. 5.2a  Feb 10, 1992
  1606.       Relaxed the requirement that dates in JJJ must be zero-filled
  1607.         on the left to occupy all 3 digits.  JJJ can now be as
  1608.         little as 1 character long, and as many as 4 characters.
  1609.  
  1610. 5.3a  Feb 13, 1992
  1611.       Replaced "eng" language parameter with "us", in case
  1612.                there might be a need to distinguish American-style
  1613.                dates from British-style dates in the future.
  1614.  
  1615. 6.1a  Feb 14, 1992   *** MAJOR ENHANCEMENT ***
  1616. *     Added /V parm, which allows a user to have Fdate itself set an
  1617.       environment variable, rather than setting Evar by piping or
  1618.       redirecting Fdate's standard output.
  1619.  
  1620.       Added output formats MN (monthname) and MN3
  1621.       Added demo batch file DO-ONCE.BAT to fdate distribution ZIP file
  1622.  
  1623. 6.2a  Feb 18, 1992   *** MAJOR ENHANCEMENT ***
  1624. *     Added f (file) input format
  1625. *     Added tcomp function
  1626.       Added demo batch file FILEDATE.BAT to distribution ZIP file
  1627.       Removed 80-byte limit on /P and /S parms.
  1628.  
  1629. 6.2b  Feb 22, 1992
  1630.       Added Aran Spence's detailed report on the circumstances in which
  1631.       /V doesn't work with 4DOS/NDOS.
  1632.  
  1633.       Replaced /V with CALLs to batch files in all demo batch files,
  1634.           so that users would not be handicapped by being
  1635.           unable to use /V if they had loaded 4DOS high.
  1636.  
  1637. 6.3a  Mar 01, 1992
  1638.       Minor fix to "full" output format, which was zero-filling hour
  1639.       to left, producing e.g. "09:15 am" instead of "9:15 am".
  1640.  
  1641. 6.4a  Mar 18, 1992
  1642.       Corrected help screen, which was incorrectly showing "f"
  1643.       as an output format rather than an input format.
  1644.  
  1645. 6.5a  Mar 25, 1992
  1646. *     Added  Spanish language format: /Lsp
  1647. *     Added  input format :  ccyy-mm-dd
  1648. *     Added output formats:
  1649.            ccyy/mm/dd        ccyy-mm-dd      ccyy.mm.dd
  1650.              yy/mm/dd          yy-mm-dd        yy.mm.dd
  1651.       Added output format:   mm (2-digit month)
  1652.       Added output format:   zzj
  1653.             Old name (julian) retained for compatibility.
  1654.  
  1655. *     Changed TIC.BAT to use new input/output format ccyy-mm-dd.
  1656.       This will help in sorting TICKLER.BAT properly at year-end.
  1657.       NOTE THAT THIS WILL CAUSE TIC NOT TO RECOGNIZE DATES
  1658.       IN AN EXISTING TICKLER.BAT FILE.
  1659.       Use           TIC EDIT
  1660.       to edit the old TICKLER.BAT and change date formats.
  1661.  
  1662. 6.6a  Mar 27, 1992
  1663. *     Added British/European input formats:  dd-mm-yy and dd-mm-ccyy
  1664.       Thanks for the request by Mr. Martin Brampton,
  1665.              Moore Stephens Chartered Accountants, London
  1666.  
  1667. 6.6b  Mar 28, 1992
  1668.       Added ALARM.BAT to FDATE.ZIP.  It had been omitted from some
  1669.             earlier distribution ZIP files.
  1670.  
  1671. 6.6c  Mar 30, 1992
  1672.       Added EXAMPLE #11, showing subscripted E-vars and loops
  1673.  
  1674. 6.7a  Apr 05, 1992
  1675. *     Added function "E" (echo)
  1676. *     Added output format: "dd mn3 yy"   EXAMPLE:     05 Sep 92
  1677.       Added JDATE.BAT demo batch file to distribution package,
  1678.             thanks to Aran Spence.
  1679.       Corrected a bug in the routine that obtained command line
  1680.             parameters.  It sometimes caused an improper value to be
  1681.             returned if a quoted parameter did not contain a space.
  1682.  
  1683. 6.8a  Aug 01, 1992
  1684. *     I will no longer be posting the most recent version of FDATE
  1685.       in ZNT:UTILFORUM because ZiffNet's new fees would require me
  1686.       to pay $30/year to do so.  Look for the most recent version
  1687.       of FDATE in CIS:IBMSYS.
  1688.  
  1689. *     Added output format:  ddmn3yy    EXAMPLE:     05Sep92
  1690.  
  1691. *     Added output format:       yy    EXAMPLE:          92
  1692.       This should make it easier for users to "roll their own"
  1693.       date formats.   For example, now that YY is available,
  1694.       you could get ddmn3yy this way:
  1695.  
  1696.       ==================================
  1697.       fdate /ff /odd  | GET ze /vpart1
  1698.       fdate /ff /omn3 | GET ze /vpart2
  1699.       fdate /ff /oyy  | GET ze /vpart3
  1700.       set xdate=%part1%%part2%%part3%
  1701.       echo today is %xdate%
  1702.       ==================================
  1703.  
  1704. *     Modified documentation in JDATE.BAT to make it clear that it
  1705.       is working with a BUSINESS julian date format: YYjjj.
  1706.       Thanks for the feedback from  Howard S. Friedman (70720,3022)
  1707.  
  1708.       Updated FDATEX.BAT to test the new formats.
  1709.